package com.juyu.miliao.api.dao.mysql;

import com.juyu.miliao.api.domain.SecretLanguagePlanetInfo;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author xuanqicheng
 * @create 2019-04-14:42
 */
@Repository
public class SecretLanguagePlanetInfoDao {

    @Autowired
    private SqlSession sqlSession;

    public List<String> selectListByTimeAndUserId(Map<String,Object> map) {

        return sqlSession.selectList("selectListByTimeAndUserId",map);
    }

    public void addSecretLanguagePlanetInfo(SecretLanguagePlanetInfo secretLanguagePlanetInfo) {
        sqlSession.insert("addSecretLanguagePlanetInfo",secretLanguagePlanetInfo);
    }

    public void deleteByUserIdAndTime(Map<String, Object> parameterMap) {
        sqlSession.delete("deleteByUserIdAndTime",parameterMap);
    }
}
